export enum MinerStatusEnum {
  'normal' = 0,
  'warning' = 1,
  'abnormal' = 2,
  'downtime' = 3,
  'online' = -2,
  'offline' = 4,
}

export enum MinerStatusClazzEnum {
  'normal-count' = 0,
  'warning-count' = 1,
  'abnormal-count' = 2,
  'downtime-count' = 3,
  'online-count' = -2,
  'offline-count' = 4,
}

export interface MinerCard {
  temp: number;
  hash: number;
  status: string;
  tempStatus: string;
  hashStatus: string;
  hashFormat?: string;
}

export interface Miner {
  accept: number;
  card: number;
  coin: string;
  core_num: number;
  cpu_temperature: string;
  cpu_temperature_avg: number;
  cpu_usage: string;
  ctime: number;
  effect_status: number;
  gid: number;
  gpu_temperature_avg: number;
  hash: number;
  hash_all: string;
  hash_avg: number;
  hottest: string;
  internet: number;
  ip: string;
  kernel: string;
  kernel_ver_name: string;
  mac: string;
  mem_usage: string;
  memory_size: number;
  mid: number;
  mtime: number;
  name: string;
  pool: string;
  reason: string;
  reboot_kernel_cnt: number;
  reject: number;
  restart: number;
  rtime: number;
  sc_coin: string;
  sc_hash: number;
  sc_hash_all: string;
  speed_all: string;
  status: number;
  temperature: string;
  wallet: string;
  hashFormat?: string;
  scHashFormat?: string;
  cards: MinerCard[];
}

export interface MinerApiResult {
  hash: [{ hash: number; coin: string }];
  limit: number;
  list: Miner[];
  page: number;
  sc_hash: [{ hash: number; coin: string }];
  status: { all: number; offline: number; online: number };
  total: number;
}
